<!DOCTYPE html>
<html lang="en" ng-app="app">

<head>
    <meta charset="UTF-8">
    <title>平安工地信息化系统</title>
    <link rel="stylesheet" href="../../images/PC-icon/font_tmtf4yf6ejhsemi/iconfont.css">
    <link rel="stylesheet" href="../../images/PC-icon/font_tmtf4yf6ejhsemi/demo.css">
    <link rel="stylesheet" href="../personclassify/personclassify.css">
    <script src="http://apps.bdimg.com/libs/angular.js/1.4.6/angular.min.js"></script>
    <script src="http://apps.bdimg.com/libs/angular-route/1.3.13/angular-route.js"></script>
    <link rel="stylesheet" href="index.css">
    <!-- <script type="text/javascript" src="controller-test.js"></script> -->
    <script type="text/javascript">
    var app = angular.module('app', []);
    app.controller('indexCtrl', ['$scope', '$http', function($scope, $http) {
        $http({
            method: 'GET',
            url: 'message.json'
        }).then(function successCallback(resp) {
            console.log(resp.data);
            $scope.item = resp.data;
            // $scope.item = resp.data[0].children;
            // $scope.item1 = resp.data[1].children;
            // $scope.item2 = resp.data[2].children;
            // $scope.item3 = resp.data[3].children;
            // $scope.item4 = resp.data[4].children;
            // $scope.item5 = resp.data[5].children;
            // $scope.item6 = resp.data[6].children;
            // $scope.item7 = resp.data[7].children;
            // console.log($scope.item);
        }, function errorCallback(resp) {
            // console.log("wrong");
        });
        console.log(222);

        function enter(v, flag) {
            console.log(v, flag);
            v.active = flag;
        }

        function doClick(){
            console.log(111);
        }
    }]);

    // angular.module('app', ['ngRoute'])
    // .controller('indexCtrl', function($scope, $route) {
    //     $scope.$route = $route;
    // })
    // .config(['$routeProvider', function($routeProvider) {
    //     $routeProvider
    //         .when('/aa', {
    //             // template: '这是首页页面',
    //             templateUrl:'../personclassify/personclassify.html',
    //             controller: 'indexCtrl'
    //         })
    //         .otherwise({
    //             redirectTo: '/'
    //         });
    // }]);
    </script>
</head>

<body ng-controller="indexCtrl">
    <div class="title">
        <!-- <img src="" alt=""> -->
        <span>锡通高速一公路工程施工现场安全生产管控系统（XT-NT-1施工标段）</span>
        <div class="title-icon">
            <span class="username">安全员，你好！ </span>
            <i class="iconfont icon-shouji"></i>
            <i class="iconfont icon-mima"></i>
            <i class="iconfont icon-xiaoxi-copy"></i>
            <i class="iconfont icon-bangzhuzhongxin"></i>
            <i class="iconfont icon-tuichu2"></i>
        </div>
    </div>
    <div  ng-click="doClick()">test</div>
    <div class="nav">
        <ul class="nav-ul">
            <li ng-repeat="v in item" ng-mouseenter="enter(v,true)" ng-mouseleave="enter(v,false)" ng-class="{'active': v.active, 'visited':v.name == '首页'}">
                <i class="iconfont {{v.iconClass}}"></i>
                <div>{{v.name}}</div>
                <ul class="dropdown-ul">
                    <li ng-repeat="v1 in v.children"><i style="font-size: 15px;display: none;" class="iconfont icon-mianxingtubiaoqianjin"></i>{{v1.name}}</li>
                </ul>
            </li>
        </ul>
        <div class="nav-bottom"><i class="iconfont icon-shouye"></i>首页</div>
    </div>
    <div ng-view>
        页面内容
        <!-- <script type="text/ng-template" id="person-classify.html">
            <div person-classify></div>
        </script> -->
    </div>
    <script type="text/javascript" src="../../../node_modules/jquery/dist/jquery.js"></script>
    <script type="text/javascript" src="index.js"></script>
</body>

</html>
